package com.mytijian.openapi.adapter.dianping.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.mytijian.openapi.adapter.dianping.service.DzOpenConsumeService;

@Component
public class DzopenOrderConsumeJob implements SimpleJob {

	private Logger logger = LoggerFactory.getLogger(getClass());

	@Autowired
	private DzOpenConsumeService dzOpenConsumeService ;
	
	
	@Override
	public void execute(ShardingContext arg0) {
		long begin = System.currentTimeMillis();
		try {
			dzOpenConsumeService.consumeExamDateIsYesterday();
		}catch (Exception e){
			logger.error("[美团点评] [核销] 任务执行失败",e);
		}
		long end = System.currentTimeMillis();
		long exetimes = end - begin;

		logger.info("[美团点评][核销]定时任务执行时间: {}ms", exetimes);
		
	}

}
